Optimal. Leaf size=43 \[ -\frac{(A b-a B) \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right )}{a^{3/2} \sqrt{b}}-\frac{A}{a x} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0209988, antiderivative size = 43, normalized size of antiderivative = 1., number of steps used = 2, number of rules used = 2, integrand size = 20, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.1, Rules used = {453, 205} \[ -\frac{(A b-a B) \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right )}{a^{3/2} \sqrt{b}}-\frac{A}{a x} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 453
Rule 205
Rubi steps
\begin{align*} \int \frac{A+B x^2}{x^2 \left (a+b x^2\right )} \, dx &=-\frac{A}{a x}-\frac{(A b-a B) \int \frac{1}{a+b x^2} \, dx}{a}\\ &=-\frac{A}{a x}-\frac{(A b-a B) \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right )}{a^{3/2} \sqrt{b}}\\ \end{align*}
Mathematica [A] time = 0.0252587, size = 42, normalized size = 0.98 \[ \frac{(a B-A b) \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right )}{a^{3/2} \sqrt{b}}-\frac{A}{a x} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.003, size = 48, normalized size = 1.1 \begin{align*} -{\frac{A}{ax}}-{\frac{Ab}{a}\arctan \left ({bx{\frac{1}{\sqrt{ab}}}} \right ){\frac{1}{\sqrt{ab}}}}+{B\arctan \left ({bx{\frac{1}{\sqrt{ab}}}} \right ){\frac{1}{\sqrt{ab}}}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.22512, size = 228, normalized size = 5.3 \begin{align*} \left [\frac{{\left (B a - A b\right )} \sqrt{-a b} x \log \left (\frac{b x^{2} + 2 \, \sqrt{-a b} x - a}{b x^{2} + a}\right ) - 2 \, A a b}{2 \, a^{2} b x}, \frac{{\left (B a - A b\right )} \sqrt{a b} x \arctan \left (\frac{\sqrt{a b} x}{a}\right ) - A a b}{a^{2} b x}\right ] \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [B] time = 0.46172, size = 82, normalized size = 1.91 \begin{align*} - \frac{A}{a x} - \frac{\sqrt{- \frac{1}{a^{3} b}} \left (- A b + B a\right ) \log{\left (- a^{2} \sqrt{- \frac{1}{a^{3} b}} + x \right )}}{2} + \frac{\sqrt{- \frac{1}{a^{3} b}} \left (- A b + B a\right ) \log{\left (a^{2} \sqrt{- \frac{1}{a^{3} b}} + x \right )}}{2} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.12937, size = 49, normalized size = 1.14 \begin{align*} \frac{{\left (B a - A b\right )} \arctan \left (\frac{b x}{\sqrt{a b}}\right )}{\sqrt{a b} a} - \frac{A}{a x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]